#ifndef TINX_USER_H
#define TINX_USER_H

#include <tinx/task.h>
#include <tinx/list.h>

#define ROOT_USER    0
#define KERNEL_USER  1

#define USER_NAME_LEN 16

typedef struct user_t
{
    int uid;
    list_t tasks;
    char name[USER_NAME_LEN];
    bool super;
} user_t;

bool suser();

user_t *user_search(char *name);
user_t *user_add(char *name, bool super);
user_t *user_get(uid_t uid);

int user_add_task(uid_t uid, task_t *task);
void user_remove_task(task_t *task);

#endif